package com.iwop.moto.dao;


import com.iwop.moto.model.FOrderPurchaseDetail;
import com.iwop.moto.model.MOrderPurchase;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * Created by mobom on 2016/12/12.
 */
public interface MOrderPurchaseDao extends BaseDAO<MOrderPurchase>{

    int insertDetail(FOrderPurchaseDetail fOrderPurchaseDetail);

    MOrderPurchase findOneBySidAndUserId(@Param("sid")String oid,@Param("store_id")String store_id);

    List<MOrderPurchase> findOrderPurchaseByMap( @Param("seller_store_id")String seller_store_id, @Param("buy_store_id")String buy_store_id);

    List<FOrderPurchaseDetail> findPurchaseDetail(@Param("seller_store_id")String seller_store_id, @Param("buy_store_id")String buy_store_id);

    @Override
    MOrderPurchase findOneById(Serializable Id);

    MOrderPurchase findOneByOrderId(Serializable order_id);

    List<FOrderPurchaseDetail> findPurchaseDetailByOid(String oid);

    MOrderPurchase findOneByPayOrderNo(String out_trade_no);

    @Override
    int update(MOrderPurchase mOrderPurchase);

    MOrderPurchase findOneByoutTradeNo(String out_trade_no);

    MOrderPurchase findModerPurchaseByOid(String outTradeNo);
}
